package com.www.conversionspring;

import com.www.conversionspring.beans.Company;
import com.www.conversionspring.beans.Computer;
import com.www.conversionspring.beans.InternetBar;
import com.www.conversionspring.beans.Mobile;
import com.www.conversionspring.dao.DictonaryMapper;
import com.www.conversionspring.formatters.TranslaterFormatter;
import com.www.conversionspring.service.MyConverterService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.format.support.DefaultFormattingConversionService;

import java.math.BigDecimal;
import java.text.ParseException;

@SpringBootApplication
public class ConversionSpringApplication {

    public static void main(String[] args) throws ParseException {

        ConfigurableApplicationContext context = SpringApplication.run(ConversionSpringApplication.class, args);
//        Mobile mobile = new Mobile();
//        mobile.setName("IPhone");
//        mobile.setPrice(new BigDecimal("800"));
//        InternetBar internetBar = context.getBean("internetBar", InternetBar.class);
//        System.out.println(internetBar);
//        MyConverterService myConverterService = context.getBean("myConverterService", MyConverterService.class);
//        Computer computer = myConverterService.convertToComputer(mobile);
//        System.out.println(computer);
//        DictonaryMapper dictonaryMapper = context.getBean("dictonaryMapper", DictonaryMapper.class);
//        String person = dictonaryMapper.selectByKey("person");
//        System.out.println(person);
        Company company = new Company();
        company.setName("oracle");
        

    }

}
